'''
Created on Dec 5, 2010

@author: jackreilly
'''

from google.appengine.ext import webapp
from jettube.models import Station
from jettube.server.utilities import googleLink
from jettube.client.responseUtil import dumpTemplate


class MainPage( webapp.RequestHandler ):
    def get( self ):
        request = self.request
        curStation = Station.getStationFromRequest(request)
        stations = Station.getStationsDictionaryForDropDownFromRequest(request)
        parameters = {'googleLink':googleLink(), 'currentStation':curStation, 'stations': stations, 'currentPage':{'index':True}}
        dumpTemplate( self , parameters = parameters ,classType="main")


class WhatIsPage( webapp.RequestHandler ):
    def get( self ):
        dumpTemplate(self, parameters = {'currentPage':{'whatis':True}},classType = 'whatis')
        
        
class NewStationPage(webapp.RequestHandler):
    def get(self):
        dumpTemplate(self, parameters = {'currentPage':{'newstation':True}}, classType='newstation')